#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int mystrlen(char* arr)
{
	char* start = arr;
	char* end = arr;
	while (*end != '\0')
	{
		end++;
	}
	return end - start;
}
void reverse(char* arr)
{
	int len = mystrlen(arr);
	char tmp = *arr;
	*arr = *(arr + len - 1);
	*(arr + len - 1) = '\0';
	if (mystrlen(arr + 1) > 1)
	{
		reverse(arr + 1);
	}
	*(arr + len - 1) = tmp;
}
int main()
{
	char arr[] = { 0 };
	scanf("%s", arr);
	reverse(arr);
	printf("%s\n", arr);
	return 0;
}
